home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c++
- Subject: Re: LINK Problem with Microsoft C++ 1.52 Help!
- Date: Mon, 19 Feb 1996 16:47:55 +0200
- Organization: Carelcomp Forest
- Message-ID: <31288D9B.5E5D@cmt.lpr.mail.carel.fi>
- References: <3125CDB0.614B@access.ch>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (WinNT; I)
-
- Robert Wellinger wrote:
- >
- > Help! Help! I need help!
- >
- > I'm working with Microsoft Visual C++ 1.52 under Windows 3.11.
- > When I compile the my project (it isn't small) there is always this
- > error:
- >
- > LINK Error L2028"
- > automatic data segment plus heap exceed 64K
- >
- > Data declared in DGROUP
- > The size of the heap specified in the HEAPSIZE statement in the
- > module-definition (.DEF) file
- > The size of the stack specified in either the /STACK option or
- > the STACKSIZE statement in the .DEF file
- >
- > Reduce near-data allocation, heap size, or stack size.
- >
- > But I can't reduce the HEAPSIZE and the STACKSIZE (the project is to
- > big) and I need a lot
- > of global (static) variables.
- >
- > If you can help me send E-MAIL to "rwellinger@access.ch"
- >
-
- If you haven't already done so, switch to large memory model. Then, in the compiler
- options, specify smaller data threshold, eg. /Gt2. This will place all your global data
- sizeof(which) >= 2 bytes to a far data segment and not into the DGROUP default. (This
- also applies to string literals such as "Hello, world!") However, you still cannot have
- more than 64kB of global data per compilation unit (ie. source module). If your
- compilation units have too much data, try breaking them into smaller pieces and use
- 'extern'.
-
- HTH,
- AriL
- --
- All my opinions are mine and mine alone.
-